<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>编辑</title>
		<link rel="stylesheet" type="text/css" href="../../plugins/layui/css/layui.css" />
		<link href="../../kitAdmin/css/app.css" rel="stylesheet" type="text/css" />
		<link rel="stylesheet" type="text/css" href="../../plugins/select2/dist/css/select2.min.css"/>
		<style type="text/css">
			.slt{
				width: 240px !important;
			}
		</style>
	</head>

	<body style="align-content: center;">
		<div class='kit-table'>
			<div style='margin:10px'>
				
		<form class='layui-form' action='' lay-filter='form-edit'>
			<input type='hidden'id="uid" name='uniqueid'  data-link='{:uniqueid}' />
			<div class='layui-form-item'>
				<div class='layui-form-item'>
					<div class='layui-inline'>
						<label class='layui-form-label'>状态</label>
						<div class='layui-input-inline'>
	
							<select placeholder=''data-link='{:state}' id='state' name='state' class='layui-input'>
								<option value="1">进行中</option>
								<option value="2">完成</option>
								<option value="3">暂停</option>
								<option value="-1">退款</option>
							</select>
						</div>
					</div>
				</div>
				
			</div>
		</form>
			</div>
		</div>
		<script src="../../common/js/jquery.js" type="text/javascript" charset="utf-8"></script>
		<script src="../../static/js/base.js" type="text/javascript" charset="utf-8"></script>
		<script src="../../plugins/jsviews/jsviews.js" type="text/javascript"></script>
		<script src="../../plugins/layui/layui.js" type="text/javascript" charset="utf-8"></script>
		<script src="../../plugins/select2/dist/js/select2.min.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			var uid = getQueryVariable('uniqueid');
			var obj={};
			jQuery(document).ready(function() {
				bindFormData();
				$('#uid').val(uid);
			});
			var callback_save=function(){
//				obj.uniqueid=uid;
				return $('.layui-form').serialize();;
			}
			function bindFormData(){
//				if(uid){
//					$.ajax({
//						url:'/teachers/'+uid,
//						type:'get',
//						success:function(data){
//							data=data.data;
//							obj.state=data.state;
//							obj.isDelete=data.isDelete;
//							obj.setTop=data.setTop;
//							$('#state').attr("checked",data.state==0);
//							$('#isDelete').attr("checked",data.isDelete==0);
//							$('#setTop').attr("checked",data.setTop==1);
//							layui.form.render();
//						},
//						error:function(){
//							parent.layer.alert('数据加载失败，系统或网络错误！');
//						}
//					});
//				}
			}
			layui.use('form', function(){
			  var form = layui.form;
			  
			  //监听提交
//			    form.on('switch(state)', function(data){
//					obj.state=this.checked ? 0 : 1;
//				}); 
//				 form.on('switch(isDelete)', function(data){
//					obj.isDelete=this.checked ? 0 : 1;
////				obj.isDelete=$('#isDelete').val();
//				}); 
//				 form.on('switch(setTop)', function(data){
//				 	
//					obj.setTop=this.checked ? 1 : 0;
//				}); 
			});
		</script>
	</body>

</html>
